﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Common;
using Database;
using Database.Model;

namespace MyBlogs.Areas.Article.Models
{
    public class ArticlePageModel : PagedBase<int>
    {
        public string Title { get; set; }
        public DateTime? CreateDate { get; set; }
        public DateTime? EditDate { get; set; }
        public string Author { get; set; }
        public string Content { get; set; }
        public string Category { get; set; }
        public bool? IsDelete { get; set; }

        public override void Set<T>(T Model)
        {
            var model = Model as Database.Model.Article;
            if (model == null) return;
            Id = model.Id;
            Title = model.Title;
            CreateDate = model.CreateDate;
            EditDate = model.EditDate;
            Author = model.Author;
            Content = model.Content;
            Category = model.Category;
        }
    }
}